import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeIndex from '../pages/Home/index'

Vue.use(VueRouter)

export default function () {
  const router = new VueRouter({
    mode: 'history',
    linkActiveClass: 'active',
    routes: [
      {
        path: '/',
        name: 'HomeIndex',
        component:HomeIndex,
        alias: '/home-index'
      }
    ]
  })

  router.beforeEach((to, from, next) => {
    // console.log(to)
    next()
  })

  return router
}
